package cn.kasa.controller;

import cn.kasa.entity.User;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class UserController {

    @Value("${server.port}")
    private int ip;

    @GetMapping("/getUserById/{id}")
    public User getUserById(@PathVariable Long id){
      return User.builder().id(id).name("zs").intro("我是zs" + ip).build();
    }
}
